<%@page import="guest.GuestVo"%>
<%@page import="java.util.Vector"%>
<%@page import="guest.Guest"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

<style>
@import url(http://fonts.googleapis.com/earlyaccess/hanna.css); /* "Hanna" */
#p_title {
   border:2px solid #0fce84;
   position:relative;
   width:1000px;
   height:40px;

   color:#ffffff;
   text-align:center;
   font-weight:normal;
   font-size:33px;
   color:#0fce84;
   margin-top: 50px;
   margin-bottom: 10px;
} 
#guest_outline{
	width: 500px;
	margin: auto;
	font-family: Hanna;
}
h1{
	text-align: center;
}
#guest_line{
	width: 500px;
	height: 100%;
	position: relative;
}
#line{
	position: relative;
	width: 500px;
	height: 30px;
}
#lineC{
	position: relative;
	width: 500px;
	height: 150px;
}
#a,#c{
	background-color: #ffaaaa;
}
#a{
	width: 120px;
	text-align: center;
}
#b{
	width:380px;
	text-align:center;
}
#c{
	width: 100%;
	text-align: center;
}
#a, #b{
	float: left;
}
#d{
	height: 100%;
	text-align: center;
}
</style>

</head>
<body>

<jsp:useBean id="vo" class="guest.GuestVo"/>
<jsp:setProperty property="*" name="vo"/>

<%
Guest g = new Guest();
g.setVo(vo);
Vector<GuestVo> v = g.list();
%>
<div id='p_title'>Schedule</div>
<div id="guest_outline">
<h1>-방명록-</h1>
<form name='find_guest' action="index.jsp?inc_contents=./guest/list.jsp" method="post">
	<input type='search' id='find' name='find' value=<%=vo.getFind()%>>
	<input type='submit' value='검색' id='btnFind'>
</form>

<input type='button' value='글쓰기' id='btnInsert' onclick="location.href='index.jsp?inc_contents=./guest/insert.jsp'">
<hr size="3" noshade="noshade"/>

<%
for(int i = 0; i<v.size(); i++){
	GuestVo gv = v.get(i);
	%>   
	
<div id='guest_list' class='div_guest_list'>
	
	<div id='line'>
	<div id='a'>작성자</div><div id='b'><%=gv.getMid()%></div>
	</div>
	<div id='line'>
	<div id='a'>제목</div><div id='b'><%=gv.getSubject()%></div>
	</div>
	<div id='line'>
	<div id='a'>날짜</div><div id='b'><%=gv.getMdate()%></div>
	</div>
	<div id='lineC'>
	<div id='c'>내용</div>
	<div id='d'><%=gv.getContent()%></div>
	</div>
	　<br/>
	
	
	<input type='button' value='수정' id='btnModify' onclick="location.href='index.jsp?inc_contents=./guest/modify.jsp&serial='+<%=gv.getSerial()%>">
	<input type='button' value='삭제' id='btnDelete' onclick="location.href='index.jsp?inc_contents=./guest/delete_result.jsp&serial='+<%=gv.getSerial()%>">
	<hr/>
</div>
<% } %>
<p/>
</div>
</body>
</html>